#!/usr/bin/env bash

set -o nounset
set -o errexit
set -o pipefail

STARTUP_DIR="$( cd "$( dirname "$0" )" && pwd )"

source ${STARTUP_DIR}/../settings.sh

KUBECTL="kubectl --context=${KUBE_CONTEXT}"

EXTERNAL_IP=$(${KUBECTL} get svc -n jenkins jenkins -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

echo "Payload URL: http://${JENKINS_USER_NAME}:${JENKINS_USER_PASSWORD}@${EXTERNAL_IP}:8080/github-webhook/"
echo "Content type: application/json"

